Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TW-1923: Improve search screen #1961

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

hieutbui
Copy link
Member

@hieutbui hieutbui commented Jul 22, 2024

Ticket

Root cause

  • Currently, when search message is empty, search controller doesn't check for keyword is Matrix ID

Solution

  • When search message is empty, check if keyword is Matrix ID then hide empty widget.

Test recommendations

  • Search keywords that is a valid Matrix ID
  • Search keywords that is a valid Matrix ID but not complete (Ex: @test:domain.co)
  • Send message with a Matrix ID inside a room then search for this Matrix ID

Resolved

  • Web:
1923.web.mp4
  • Android:
  • IOS:

Copy link

This PR has been deployed to https://linagora.github.io/twake-on-matrix/1961

@hieutbui hieutbui force-pushed the TW-1923-Improve-search-screen branch from e12cfd6 to 7b370f6 Compare July 23, 2024 03:12
@hieutbui hieutbui changed the title [WIP] TW-1923: Improve search screen TW-1923: Improve search screen Jul 23, 2024
Comment on lines 77 to 79
if (searchController.searchContactAndRecentChatController!
.recentAndContactsNotifier.value.isNotEmpty) {
.recentAndContactsNotifier.value.isNotEmpty ||
(keyword.isValidMatrixId && keyword.startsWith('@'))) {
Copy link
Collaborator

@sherlockvn sherlockvn Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to make a function

Comment on lines 33 to 35
.recentAndContactsNotifier.value.isEmpty &&
!(keyword.isValidMatrixId && keyword.startsWith('@'))) {
return child!;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@sherlockvn
Copy link
Collaborator

not in the DOD, but i think this case, we should remove the Messages section too
image

@KhaledNjim
Copy link
Contributor

not in the DOD, but i think this case, we should remove the Messages section too image

Updated

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants